import Http from '../http';
import { SysCorporation } from '../../model/corporation/corporation';
import { UpdateIsOpenInPut } from '@/model/public/public';

//获取所有公司
export const getAllCorporation = async function() {
    return await Http.get('/api/SysCorporation/GetAllCorporation');
 }

//获取所有公司-select结构
export const getAllCorporationSelect = async function() {
   return await Http.get('/api/SysCorporation/GetAll');
}

 //获取公司下的系统
 export const getCorporationSystemList = async function() {
    return await Http.get('/api/SysCorporation/GetCorporationSystemList');
 }
 
 //新增公司
 export const insert = function(sysCorporation: SysCorporation) {
   return Http.post('/api/SysCorporation/Insert', sysCorporation)
}

 //编辑公司
 export const update = function(sysCorporation: SysCorporation) {
   return Http.post('/api/SysCorporation/Update', sysCorporation)
}

 //设置公司是否启用
 export const SetCorporationIsOpen = function(updateCorporationIsOpenInPut: UpdateIsOpenInPut) {
   return Http.post('/api/SysCorporation/SetCorporationIsOpen', updateCorporationIsOpenInPut)
}